Skip to content

Say checked by simulation only when the fix removes its link - #81

Merged
Pranav-Mathad merged 1 commit into
issue-12-found-problemsfrom
issue-80-simulation-badge
Nov 29, 2026
Merged

Pranav-Mathad merged 1 commit into
issue-12-found-problemsfrom
issue-80-simulation-badge

Conversation

@Pranav-Mathad

Copy link
Copy Markdown
Owner

Closes #80.

Targets issue-12-found-problems (#77), one commit on top of the merge of #79. Web wording and one spec sentence only: no change to report output, results/ or the bundles, so no new report run is needed.

Why

The web app said "checked by simulation" for every simulation that ran without adding exceptions. No screen read Simulation.target_link_removed, so a simulated fix that leaves its target link in place was shown the same way as one that removes it. "Try the fix" is the step that shows a realistic improvement, so the wording must not claim more than the simulation showed.

What changes

  • web/src/screens/decisions/FixFirst.tsx: new linkRemains(simulation); the list badge and the detail text use it.
  • web/src/screens/grid/FixPanel.tsx: the panel title uses it.
  • spec.md §8.5: one sentence for the case the spec did not cover.

For a simulation with simulated: true:

target_link_removed List badge Detail text Grid panel title, fix on
true, no new exceptions Checked by simulation Fix checked by simulation: loops 1 to 0, 1 link removed, 0 added. No new exceptions. Fix checked by simulation
true, new exceptions Simulated, adds exceptions Fix checked by simulation: … Warning: 1 new exception. Fix checked by simulation
false Simulated: the link remains Simulated: the link remains. Loops 1 to 0, 1 link removed, 0 added. No new exceptions. Fix simulated: the link remains
false, new exceptions Simulated: the link remains Simulated: the link remains. … Warning: 1 new exception. Fix simulated: the link remains

The first two rows are unchanged. "Not simulated", the "Try the fix" button and the batch row are unchanged. No new style or colour.

What I ran and saw

  • make check on top of 6cf1072: ruff passed, 36 Python tests passed and 1 skipped, web contracts up to date, typecheck, 4 web tests passed, build.
  • The app was served locally and the Decisions screen and the grid (fix on) were rendered with headless Chrome for the cheap-loop finding of the synthetic fixture bundle. The text of all four rows was read out of the rendered page. For the rows the fixture does not contain, target_link_removed and new_exceptions were edited in the working copy for the render and then restored; the fixture is unchanged in this pull request.

Not done, and limits

  • Not looked at by eye. The text was read from the rendered page; nobody has seen the screen or a screenshot.
  • Not seen on real data. The fixture bundles hold no simulation with target_link_removed: false. The judged runs in Fix the problems found on the three repositories and publish the judged results #77 do; please open the judged Artemis bundle after merging and check one finding of each kind.
  • The counts per repository that Say "checked by simulation" only when the fix removes its link #80 asks for (how many simulated findings fall in each row) need the judged runs and are not in this pull request.
  • The last wording change was not rendered again. After the render, the first word after "the link remains." was capitalised ("Loops"). That change was covered by typecheck, the web tests and the build, not by a second render.
  • Not changed here: the cheap-loop fix sentence says "Moving X removes the link." Where the simulation says the link remains, the two now disagree on screen. That sentence comes from report/templates.py and is a separate question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant